
import { JsonUtil } from "db://app-game/core/utils/JsonUtil";

export class TableItem {
    static TableName: string = "Item";

    public data: any;

    init(id: number) {
        var table = JsonUtil.get(TableItem.TableName);
        this.data = table[id];
        this.id = id;
    }

    /** 编号【KEY】 */
    id: number = 0;

    /** 物品类型 */
    get itemType(): number {
        return this.data.itemType;
    }
    /** 详情Id */
    get detailsId(): number {
        return this.data.detailsId;
    }
    /** 名称 */
    get name(): string {
        return this.data.name;
    }
    /** 描述 */
    get description(): string {
        return this.data.description;
    }
    /** 最大数量 */
    get maxCount(): number {
        return this.data.maxCount;
    }
    /** 图标路径 */
    get iconPath(): string {
        return this.data.iconPath;
    }
}
    